	.text
	.attribute	4, 16
	.attribute	5, "rv64i2p1_m2p0_a2p1_f2p2_d2p2_zicsr2p0_zifencei2p0"
	.file	"fib.c"
	.globl	main                            # -- Begin function main
	.p2align	2
	.type	main,@function
main:                                   # @main
	.cfi_startproc
# %bb.0:
	addi	sp, sp, -48
	.cfi_def_cfa_offset 48
	sd	ra, 40(sp)                      # 8-byte Folded Spill
	sd	s0, 32(sp)                      # 8-byte Folded Spill
	.cfi_offset ra, -8
	.cfi_offset s0, -16
	addi	s0, sp, 48
	.cfi_def_cfa s0, 0
	li	a0, 0
	sw	a0, -20(s0)
	li	a1, 10
	sw	a1, -24(s0)
	sw	a0, -28(s0)
	sw	a0, -36(s0)
	sw	a0, -28(s0)
	j	.LBB0_1
.LBB0_1:                                # =>This Inner Loop Header: Depth=1
	lw	a0, -28(s0)
	lw	a1, -24(s0)
	bge	a0, a1, .LBB0_6
	j	.LBB0_2
.LBB0_2:                                #   in Loop: Header=BB0_1 Depth=1
	lw	a0, -28(s0)
	call	fibonacci
	sw	a0, -32(s0)
	lw	a0, -32(s0)
	call	isOdd
	li	a1, 1
	bne	a0, a1, .LBB0_4
	j	.LBB0_3
.LBB0_3:                                #   in Loop: Header=BB0_1 Depth=1
	lw	a0, -36(s0)
	addiw	a0, a0, 1
	sw	a0, -36(s0)
	j	.LBB0_4
.LBB0_4:                                #   in Loop: Header=BB0_1 Depth=1
	lw	a0, -32(s0)
	sd	a0, -48(s0)                     # 8-byte Folded Spill
	call	isOdd
	mv	a1, a0
	ld	a0, -48(s0)                     # 8-byte Folded Reload
	call	printResults
	j	.LBB0_5
.LBB0_5:                                #   in Loop: Header=BB0_1 Depth=1
	lw	a0, -28(s0)
	addiw	a0, a0, 1
	sw	a0, -28(s0)
	j	.LBB0_1
.LBB0_6:
	li	a0, 0
	ld	ra, 40(sp)                      # 8-byte Folded Reload
	ld	s0, 32(sp)                      # 8-byte Folded Reload
	addi	sp, sp, 48
	ret
.Lfunc_end0:
	.size	main, .Lfunc_end0-main
	.cfi_endproc
                                        # -- End function
	.globl	fibonacci                       # -- Begin function fibonacci
	.p2align	2
	.type	fibonacci,@function
fibonacci:                              # @fibonacci
	.cfi_startproc
# %bb.0:
	addi	sp, sp, -32
	.cfi_def_cfa_offset 32
	sd	ra, 24(sp)                      # 8-byte Folded Spill
	sd	s0, 16(sp)                      # 8-byte Folded Spill
	.cfi_offset ra, -8
	.cfi_offset s0, -16
	addi	s0, sp, 32
	.cfi_def_cfa s0, 0
                                        # kill: def $x11 killed $x10
	sw	a0, -24(s0)
	lw	a0, -24(s0)
	bnez	a0, .LBB1_2
	j	.LBB1_1
.LBB1_1:
	li	a0, 0
	sw	a0, -20(s0)
	j	.LBB1_5
.LBB1_2:
	lw	a0, -24(s0)
	li	a1, 1
	bne	a0, a1, .LBB1_4
	j	.LBB1_3
.LBB1_3:
	li	a0, 1
	sw	a0, -20(s0)
	j	.LBB1_5
.LBB1_4:
	lw	a0, -24(s0)
	addiw	a0, a0, -1
	call	fibonacci
	sd	a0, -32(s0)                     # 8-byte Folded Spill
	lw	a0, -24(s0)
	addiw	a0, a0, -2
	call	fibonacci
	mv	a1, a0
	ld	a0, -32(s0)                     # 8-byte Folded Reload
	addw	a0, a0, a1
	sw	a0, -20(s0)
	j	.LBB1_5
.LBB1_5:
	lw	a0, -20(s0)
	ld	ra, 24(sp)                      # 8-byte Folded Reload
	ld	s0, 16(sp)                      # 8-byte Folded Reload
	addi	sp, sp, 32
	ret
.Lfunc_end1:
	.size	fibonacci, .Lfunc_end1-fibonacci
	.cfi_endproc
                                        # -- End function
	.globl	isOdd                           # -- Begin function isOdd
	.p2align	2
	.type	isOdd,@function
isOdd:                                  # @isOdd
	.cfi_startproc
# %bb.0:
	addi	sp, sp, -32
	.cfi_def_cfa_offset 32
	sd	ra, 24(sp)                      # 8-byte Folded Spill
	sd	s0, 16(sp)                      # 8-byte Folded Spill
	.cfi_offset ra, -8
	.cfi_offset s0, -16
	addi	s0, sp, 32
	.cfi_def_cfa s0, 0
                                        # kill: def $x11 killed $x10
	sw	a0, -24(s0)
	lw	a0, -24(s0)
	srliw	a1, a0, 31
	addw	a1, a0, a1
	andi	a1, a1, -2
	subw	a0, a0, a1
	li	a1, 1
	bne	a0, a1, .LBB2_2
	j	.LBB2_1
.LBB2_1:
.Lpcrel_hi0:
	auipc	a0, %pcrel_hi(globalCounter)
	addi	a1, a0, %pcrel_lo(.Lpcrel_hi0)
	lw	a0, 0(a1)
	addiw	a0, a0, 1
	sw	a0, 0(a1)
	li	a0, 1
	sw	a0, -20(s0)
	j	.LBB2_3
.LBB2_2:
	li	a0, 0
	sw	a0, -20(s0)
	j	.LBB2_3
.LBB2_3:
	lw	a0, -20(s0)
	ld	ra, 24(sp)                      # 8-byte Folded Reload
	ld	s0, 16(sp)                      # 8-byte Folded Reload
	addi	sp, sp, 32
	ret
.Lfunc_end2:
	.size	isOdd, .Lfunc_end2-isOdd
	.cfi_endproc
                                        # -- End function
	.globl	printResults                    # -- Begin function printResults
	.p2align	2
	.type	printResults,@function
printResults:                           # @printResults
	.cfi_startproc
# %bb.0:
	addi	sp, sp, -32
	.cfi_def_cfa_offset 32
	sd	ra, 24(sp)                      # 8-byte Folded Spill
	sd	s0, 16(sp)                      # 8-byte Folded Spill
	.cfi_offset ra, -8
	.cfi_offset s0, -16
	addi	s0, sp, 32
	.cfi_def_cfa s0, 0
                                        # kill: def $x12 killed $x11
                                        # kill: def $x12 killed $x10
	sw	a0, -20(s0)
	sw	a1, -24(s0)
	lw	a0, -20(s0)
	call	putint
	li	a0, 10
	sd	a0, -32(s0)                     # 8-byte Folded Spill
	call	putch
	lw	a0, -24(s0)
	call	putint
	ld	a0, -32(s0)                     # 8-byte Folded Reload
	call	putch
	ld	ra, 24(sp)                      # 8-byte Folded Reload
	ld	s0, 16(sp)                      # 8-byte Folded Reload
	addi	sp, sp, 32
	ret
.Lfunc_end3:
	.size	printResults, .Lfunc_end3-printResults
	.cfi_endproc
                                        # -- End function
	.type	globalCounter,@object           # @globalCounter
	.section	.sbss,"aw",@nobits
	.globl	globalCounter
	.p2align	2, 0x0
globalCounter:
	.word	0                               # 0x0
	.size	globalCounter, 4

	.ident	"Ubuntu clang version 18.1.3 (1ubuntu1)"
	.section	".note.GNU-stack","",@progbits
	.addrsig
	.addrsig_sym fibonacci
	.addrsig_sym isOdd
	.addrsig_sym printResults
	.addrsig_sym putint
	.addrsig_sym putch
	.addrsig_sym globalCounter
